<template>
  <div class="aside_container">
      
    <div class="aside_header">
        <span class="green">HAPPY</span><span>MMALL</span>
    </div>
    <el-menu
      default-active="2"
      class="el-menu-vertical-demo"
      @open="handleOpen"
      @close="handleClose"
      background-color="#2B2E33"
      text-color="#fff"
      active-text-color="#2DAFCB"
    >
      <el-menu-item index="2">
        <i class="el-icon-menu"></i>
        <span slot="title">首页</span>
      </el-menu-item>
      <el-submenu index="1">
        <template slot="title">
          <i class="el-icon-location"></i>
          <span>商品</span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="1-1">商品管理</el-menu-item>
          <el-menu-item index="1-2">品类管理</el-menu-item>
        </el-menu-item-group>
      </el-submenu>
      <el-submenu index="3">
        <template slot="title">
          <i class="el-icon-document"></i>
          <span>订单</span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="1-1">订单管理</el-menu-item>
        </el-menu-item-group>
      </el-submenu>
      <el-submenu index="4">
        <template slot="title">
          <i class="el-icon-user"></i>
          <span>用户</span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="1-1">用户列表</el-menu-item>
        </el-menu-item-group>
      </el-submenu>
    </el-menu>
  </div>
</template>

<script>
export default {
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    },
  },
};
</script>

<style lang="scss" scoped>
.aside_header {
  width: 100%;
  height: 60px;
  color: #fff;
//   background-color: orange;
  display: inline-flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  text-indent: 20px;
  font-size: 28px;
}
.el-menu-item {
    background-color: #2B2E33;
}
.green {
    color: #2DAFCB;
}
</style>